set(PROJECT_NAME glib)
cmake_minimum_required(VERSION 3.14)
project(${PROJECT_NAME})

set(CMAKE_POSITION_INDEPENDENT_CODE ON)

add_definitions("-Wall -Werror -lpthread -fPIC")

if(${CMAKE_BUILD_TYPE} MATCHES "debug")
    add_definitions("-g -D __DEBUG__ -O0")
else()
    add_definitions("-O2")
endif()

SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/output)   
SET(LIBRARY_OUTPUT_PATH    ${PROJECT_SOURCE_DIR}/output)
SET(GTEST_LOAD_TYPE 0)

include_directories(
    src
    intf
)

link_directories(
    ${PROJECT_SOURCE_DIR}/output
)

add_subdirectory(src)
add_subdirectory(test)
